package com.boot.springbootdemo.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

//TODO 5 @ConfigurationProperties 必须有无参构造

/**
 * 只有容器中的组件才有springboot提供的强大功能
 */
@Component
@ConfigurationProperties(prefix = "mycar")
@Data
public class Car {

    private String brand;
    private Integer price;

}
